<?php 
require '../../../../zb_system/function/c_system_base.php';
require '../../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('aymFreeFour')) {$zbp->ShowError(48);die();}
$blogtitle=$zbp->theme.'主题配置->基础设置';
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';
if(isset($_POST['Forum'])){	
if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();
	foreach($_POST['Forum'] as $key=>$val){
	   $zbp->Config('aymFreeFour')->$key = $val;
	}
	$zbp->SaveConfig('aymFreeFour');
	$zbp->ShowHint('good');
}
$array=$zbp->GetCategoryList(null,null,array('cate_Order'=>'ASC'),null,null);
$w[] = array('=', 'log_Type', '1');
?>
<div id="divMain">
	<div class="divHeader"><?php echo $blogtitle;?></div>
	<div class="SubMenu"><?php aymFreeFour_SubMenu(0);?></div>  
	<div id="divMain2" class="settings">
		<table width="100%" cellspacing='0' cellpadding='0' class="tableBorder">
			<tr height="32">
			    <td>
			    	<strong style="color:#F00">温馨提示：</strong>请在此处对aymFreeFour模板进行配置，请在插件管理中安装启用<strong style="color:#F00">UEditor编辑器</strong>插件，否则不能使用图片上传，只能输入图片URL地址
			    </td>
			</tr>
		</table>
		<form id="form1" name="form1" method="post">
			<table width="100%" cellspacing='0' cellpadding='0' class="tableBorder">
			<tr>
				<th width='20%'>设置项</th>
				<th width='50%'>内容</th>
				<th width='30%'>描述</th>
			</tr>
			<tr class="tr">
				<td>
					<label for="favicon">浏览器图标</label>
				</td>
				<td class="show">
					<?php if($zbp->Config('aymFreeFour')->favicon){?>
					<img src="<?php echo $zbp->Config('aymFreeFour')->favicon;?>"/>
					<?php }?>
					<div class="uploadimg">
						<input name="Forum[favicon]" id="favicon" type="text" class="text uplod_img" value="<?php echo $zbp->Config('aymFreeFour')->favicon;?>" />
						<?php if ($zbp->CheckPlugin('UEditor')) {?>
						<span class="btn">上传图标</span>
						<?php } ?>
					</div>
				</td>
				<td>
					<p>建议尺寸32px × 32px</p>
				</td>
			</tr>
			<tr class="tr">
				<td>
					<label for="avatar">博主头像</label>
				</td>
				<td class="show">
					<?php if($zbp->Config('aymFreeFour')->avatar){?>
					<img src="<?php echo $zbp->Config('aymFreeFour')->avatar;?>"/>
					<?php }?>
					<div class="uploadimg">
						<input name="Forum[avatar]" id="avatar" type="text" class="text uplod_img" value="<?php echo $zbp->Config('aymFreeFour')->avatar;?>" />
						<?php if ($zbp->CheckPlugin('UEditor')) {?>
						<span class="btn">上传头像</span>
						<?php } ?>
					</div>
				</td>
				<td>
					<p>留空不显示，建议尺寸201px × 201px</p>
				</td>
			</tr>
			<tr>
				<td>
					<label for="about">博主介绍</label>
				</td>
				<td>
					<textarea name='Forum[about]' class="text"><?php echo htmlspecialchars($zbp->Config('aymFreeFour')->about);?></textarea>
				</td>
				<td>
					<p>前台左上角博主介绍信息，可以使用&lt;br/&gt;标签换行</p>
				</td>
			</tr>
			<tr class="tr">
				<td>
					<label for="alipay">支付宝</label>
				</td>
				<td class="show">
					<?php if($zbp->Config('aymFreeFour')->alipay){?>
					<img src="<?php echo $zbp->Config('aymFreeFour')->alipay;?>"/>
					<?php }?>
					<div class="uploadimg">
						<input name="Forum[alipay]" id="alipay" type="text" class="text uplod_img" value="<?php echo $zbp->Config('aymFreeFour')->alipay;?>" />
						<?php if ($zbp->CheckPlugin('UEditor')) {?>
						<span class="btn">上传图片</span>
						<?php } ?>
					</div>
				</td>
				<td>
					<p>详情页打赏支付宝收款二维码</p>
				</td>
			</tr>
			<tr class="tr">
				<td>
					<label for="wxpay">微信</label>
				</td>
				<td class="show">
					<?php if($zbp->Config('aymFreeFour')->wxpay){?>
					<img src="<?php echo $zbp->Config('aymFreeFour')->wxpay;?>"/>
					<?php }?>
					<div class="uploadimg">
						<input name="Forum[wxpay]" id="wxpay" type="text" class="text uplod_img" value="<?php echo $zbp->Config('aymFreeFour')->wxpay;?>" />
						<?php if ($zbp->CheckPlugin('UEditor')) {?>
						<span class="btn">上传图片</span>
						<?php } ?>
					</div>
				</td>
				<td>
					<p>详情页打赏微信收款二维码</p>
				</td>
			</tr>
			<tr>
				<td>
					<label for="ICP">网站备案号</label>
				</td>
				<td>
					<input name="Forum[icp]" type="text" id="icp" class="text" value="<?php echo $zbp->Config('aymFreeFour')->icp;?>" />
				</td>
				<td>
					<p>输入网站ICP备案号，在网站底部显示</p>
				</td>
			</tr>
			
			<tr>
				<td>
					<label for="clearSetting">清除主题配置</label>
				</td>
				<td colspan="2">
					<input id="clearSetting" name="Forum[clearSetting]" type="text" value="<?php echo $zbp->Config('aymFreeFour')->clearSetting;?>" class="checkbox"/><span class="warning"> 开启后，当在主题管理中更换主题后，该主题的所有设置都将被清空，请谨慎操作！</span>
				</td>
			</tr>
			</table>
			<?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?>
			<div class="clear"></div>
			<div class="submit">
				<input name="" type="Submit" class="button" value="保存"/>
			</div>
		</form>
	</div>
</div>
<?php 
if ($zbp->CheckPlugin('UEditor')) {	
	echo '<script type="text/javascript" src="'.$zbp->host.'zb_users/plugin/UEditor/ueditor.config.php"></script>';
	echo '<script type="text/javascript" src="'.$zbp->host.'zb_users/plugin/UEditor/ueditor.all.min.js"></script>';
	echo '<script type="text/javascript" src="lib.upload.js"></script>';
}
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>